package com.by.controller;

import com.by.entity.ResultBean;
import com.by.entity.Order;
import com.by.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 江俊俊
 * @version 1.0
 * @description
 * @date 2025/4/10 11:08
 * @since JDK1.8
 */
@RestController
@RequestMapping("/api")
public class OrderController extends BaseController{

    @Autowired
    OrderService orderService;


    @GetMapping("/query")
    public ResultBean queryOrder(int id) {
        Order order = orderService.getById(id);
        return success("查询成功",order);
    }
}
